<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">GGRADANDER</b>
<td valign="baseline" align="right" class="function"><a href="../../linear/anderson/index.html" target="mdsdir"><img border = 0 src="../../up.gif"></a></table>
  <p><b>Gradient method to solve the Generalized Anderson's task.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;ggradandr(&nbsp;distrib)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;ggradandr(&nbsp;distrib,&nbsp;options)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;ggradandr(&nbsp;distrib,&nbsp;options,&nbsp;init_model)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;This&nbsp;function&nbsp;is&nbsp;an&nbsp;implementation&nbsp;of&nbsp;the&nbsp;algorithm</span><br>
<span class=help>&nbsp;&nbsp;using&nbsp;the&nbsp;generalized&nbsp;gradient&nbsp;optimization&nbsp;to&nbsp;solve</span><br>
<span class=help>&nbsp;&nbsp;the&nbsp;the&nbsp;Generalized&nbsp;Anderson's&nbsp;task&nbsp;[<a href="../../references.html#SH10" title = "M.I.Schlesinger and V.Hlavac. Ten lectures on statistical and structural pattern recognition. Kluwer Academic Publishers, 2002." >SH10</a>].</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;goal&nbsp;of&nbsp;the&nbsp;GAT&nbsp;is&nbsp;find&nbsp;the&nbsp;binary&nbsp;linear&nbsp;classification</span><br>
<span class=help>&nbsp;&nbsp;rule&nbsp;(g(x)=sgn(W'*x+b)&nbsp;with&nbsp;minimal&nbsp;probability&nbsp;of&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;misclassification.&nbsp;The&nbsp;conditional&nbsp;probabilities&nbsp;are&nbsp;known&nbsp;to&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;be&nbsp;Gaussians&nbsp;their&nbsp;paramaters&nbsp;belong&nbsp;to&nbsp;a&nbsp;given&nbsp;set&nbsp;of&nbsp;parameters.&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;true&nbsp;parameters&nbsp;are&nbsp;not&nbsp;known.&nbsp;The&nbsp;linear&nbsp;rule&nbsp;which&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;guarantes&nbsp;the&nbsp;minimimal&nbsp;classification&nbsp;error&nbsp;for&nbsp;the&nbsp;worst&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;possible&nbsp;case&nbsp;(the&nbsp;worst&nbsp;configuration&nbsp;of&nbsp;Gaussains)&nbsp;is&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;sought&nbsp;for.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;distrib&nbsp;[struct]&nbsp;Binary&nbsp;labeled&nbsp;Gaussian&nbsp;distributions:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Mean&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Mean&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Cov&nbsp;[dim&nbsp;x&nbsp;dim&nbsp;x&nbsp;ncomp]&nbsp;Covariance&nbsp;matrices.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.y&nbsp;[1&nbsp;x&nbsp;ncomp]&nbsp;labels&nbsp;of&nbsp;Gaussians&nbsp;(1&nbsp;or&nbsp;2).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;[struct]&nbsp;Defines&nbsp;stopping&nbsp;condition:&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.tmax&nbsp;[1x1]&nbsp;Maximal&nbsp;number&nbsp;of&nbsp;iterations&nbsp;(default&nbsp;1e4&nbsp;).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.eps&nbsp;[1x1]&nbsp;Minimal&nbsp;change&nbsp;in&nbsp;the&nbsp;optimised&nbsp;criterion&nbsp;(default&nbsp;0).</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;init_model&nbsp;[struct]&nbsp;Initial&nbsp;model:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.W,&nbsp;.b,&nbsp;.t&nbsp;see&nbsp;below.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Linear&nbsp;classifier:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.W&nbsp;[dim&nbsp;x&nbsp;1]&nbsp;Normal&nbsp;vector&nbsp;of&nbsp;the&nbsp;found&nbsp;hypeprlane&nbsp;W'*x&nbsp;+&nbsp;b&nbsp;=&nbsp;0.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.b&nbsp;[1x1]&nbsp;Bias&nbsp;of&nbsp;the&nbsp;hyperplane.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.r&nbsp;[1x1]&nbsp;Mahalanobis&nbsp;distance&nbsp;for&nbsp;the&nbsp;cloasest&nbsp;Gaussian.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.err&nbsp;[1x1]&nbsp;Probability&nbsp;of&nbsp;misclassification.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.t&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;iterations.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.exitflag&nbsp;[1x1]&nbsp;0&nbsp;...&nbsp;maximal&nbsp;number&nbsp;of&nbsp;iterations&nbsp;exceeded.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;...&nbsp;condition&nbsp;abs(&nbsp;r&nbsp;-&nbsp;old_r)&nbsp;&lt;&nbsp;eps&nbsp;fulfilled.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;distrib&nbsp;=&nbsp;load('mars');</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;ggradandr(&nbsp;distrib&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;pandr(&nbsp;model,&nbsp;distrib&nbsp;);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;<a href = "../../linear/anderson/androrig.html" target="mdsbody">ANDRORIG</a>,&nbsp;<a href = "../../linear/anderson/eanders.html" target="mdsbody">EANDERS</a>,&nbsp;<a href = "../../linear/anderson/ganders.html" target="mdsbody">GANDERS</a>,&nbsp;<a href = "../../linear/anderson/andrerr.html" target="mdsbody">ANDRERR</a>,&nbsp;<a href = "../../linear/linclass.html" target="mdsbody">LINCLASS</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../../linear/anderson/list/ggradandr.html">ggradandr.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 17-sep-2003, VF<br>

</body>
</html>
